package cn.lx.auth.secutity.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @ClassName AuthPropertiesUtil
 * @Description: //todo
 * @Author: 落雪
 * @CreateDate: 2025/7/14 23:26
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/7/14 23:26
 * @UpdateRemark:
 * @Version: 1.0
 */
@Component
public class AuthPropertiesUtil {
    public static String securityType;
    public static String permits;
    public static String activeReferer;
    public static String referePermits;

    public AuthPropertiesUtil() {
    }

    @Value("${security.type:'hsa-sso'}")
    public void setSecurityType(String securityType) {
        AuthPropertiesUtil.securityType = securityType;
    }

    @Value("${security.oauth2.client.permits:'/hsaf_pass'}")
    public void setPermits(String permits) {
        AuthPropertiesUtil.permits = permits;
    }

    @Value("${security.referer.url:}")
    public void setActiveReferer(String activeReferer) {
        AuthPropertiesUtil.activeReferer = activeReferer;
    }

    @Value("${security.referer.permits:}")
    public void setReferePermits(String referePermits) {
        AuthPropertiesUtil.referePermits = referePermits;
    }
}
